<template>
  <div class="confirm">
    <div class="theme">
      <div class="wrapper">
        <h1 class="title">确认测试/验收测试</h1>
        <h2 class="desc">
          确认测试又称有效性测试。有效性测试是在模拟的环境下，运用黑盒测试的方法，验证被测软件是否满足需求规格说明书列出的需求。任务是验证软件的功能和性能及其他特性是否与用户的要求一致。对软件的功能和性能要求在软件需求规格说明书中已经明确规定，它包含的信息就是软件确认测试的基础。
        </h2>
        <el-button
          class="banner-button"
          size="large"
          type="primary"
          round
          @click="openForm"
        >
          立即体验
        </el-button>
      </div>
    </div>
    <div class="section" style="background-image: none">
      <div class="wrapper">
        <h2 id="yycj" class="section-title">应用场景</h2>
        <div class="section-row" style="display: flex; flex-flow: row wrap">
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">项目验收与结题</h3>
              <p class="sub-desc">
                在科研项目结题或甲方发起的项目验收中，确认测试是必不可少的一环，用于验证软件是否满足预定的功能、性能和安全要求‌。
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">软件更新与补丁发布‌</h3>
              <p class="sub-desc">
                在软件更新或补丁发布前，进行确认测试可以确保新功能或修复的漏洞能够正常工作，避免引入新的问题‌。
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌持续集成/持续部署(CI/CD)</h3>
              <p class="sub-desc">
                CD流程中，确认测试用于验证每一阶段输出的正确性和稳定性，确保代码质量和产品性能‌。
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">合规性与标准遵循‌</h3>
              <p class="sub-desc">
                对于需要满足特定行业标准或法规的软件，确认测试可以证明其符合相关要求，如金融、医疗等领域的软件通常需要经过严格的确认测试‌。
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌用户验收与市场准入‌</h3>
              <p class="sub-desc">
                确认测试还可以作为用户验收测试的一部分，评估软件是否满足用户需求，并为软件进入市场提供质量证明‌。
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌互操作性与兼容性测试‌</h3>
              <p class="sub-desc">
                在软件需要与其他系统或设备交互或兼容时，确认测试可以验证其互操作性和兼容性，确保软件在多种环境下的稳定运行‌。
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div
      class="section"
      style="background-image: none; background-color: #f7f7f7"
    >
      <div class="wrapper">
        <h2 id="bzhff" class="section-title">标准和方法</h2>
        <div class="section-content">
          <p class="sub-desc">
            GB/T25000.51-2016《系统与软件工程系统与软件质量要求和评价(SQuaRE)第51部分:就绪可用软件产品(RUSP)的质量要求和测试细则》<br />
            GJB/Z 141-2004《军用软件测试指南》<br />
          </p>
        </div>
      </div>
    </div>
    <div class="section" style="background-image: none">
      <div class="wrapper">
        <h2 id="bzjfw" class="section-title">标准交付物</h2>
        <div class="section-content">
          <div style="display: flex; justify-content: center">
            <img src="@/assets/img/确认测试封皮.png" alt="" />
            <img src="@/assets/img/确认测试目录.png" alt="" />
          </div>
        </div>
      </div>
    </div>
    <div class="anchor">
      <el-anchor :offset="70">
        <el-anchor-link
          title="yycj"
          class="ant-anchor-ink"
          @click="goAnchor('#yycj')"
        >
          应用场景
        </el-anchor-link>
        <el-anchor-link
          title="bzhff"
          class="ant-anchor-ink"
          @click="goAnchor('#bzhff')"
        >
          标准和方法
        </el-anchor-link>
        <el-anchor-link
          title="bzjfw"
          class="ant-anchor-ink"
          @click="goAnchor('#bzjfw')"
        >
          标准交付物
        </el-anchor-link>
      </el-anchor>
    </div>
  </div>
  <!-- 创建订单 -->
  <CreateForm ref="formRef" />
</template>

<script setup>
import { ref, computed, defineEmits } from "vue";
import { useUserStore } from "@/store/modules/user";
import CreateForm from "../CreateForm.vue";
import { ElMessage } from "element-plus";
const userStore = useUserStore();
const userInfo = computed(() => userStore.userInfo);
const goAnchor = (selector) => {
  document.querySelector(selector).scrollIntoView({
    behavior: "smooth",
  });
};
/** 创建订单 */
const formRef = ref();
const openForm = () => {
  if (userInfo.value) {
    formRef.value.opendialog(0);
  } else {
    ElMessage({ message: "请先进行用户登录！", type: "warning" });
    userStore.setisShowLogin(true);
  }
};
</script>

<style lang="scss" scope>
.confirm {
  margin-top: 60px;

  .theme {
    height: 626px;
    width: 100%;
    background: #f7f7f7;
    background-image: url("@/assets/img/bac.jpg");
    background-size: 100% 100%;

    .banner-button {
      width: 12%;
    }

    .wrapper {
      margin: 0 auto;
      max-width: 1232px;
      padding: 167px 16px 0;
      position: relative;
      width: 100%;

      .title {
        color: #333;
        display: inline-block;
        font-size: 42px;
        font-weight: 700;
        margin-bottom: 12px;
        position: relative;
      }

      .desc {
        color: #333;
        font-size: 20px;
        font-weight: 400;
        line-height: 36px;
        margin-bottom: 40px;
        max-width: 680px;
      }
    }
  }

  .section {
    width: 100%;
    background: #fff;
    padding-bottom: 100px;
    background-image: url("@/assets/img/1d0799d2.png");
    background-size: 100% 100%;

    .wrapper {
      height: 100%;
      margin: 0 auto;
      max-width: 1232px;
      padding: 80px 16px 0;

      .section-title {
        margin-bottom: 50px;
        padding: 0 10px;
        color: #000;
        font-size: 32px;
        font-weight: 500;
        margin-bottom: 60px;
        text-align: center;
      }

      .section-content {
        zoom: 1;
        box-sizing: border-box;
        display: block;
        height: auto;
        margin-left: 0;
        margin-right: 0;
        position: relative;
        background-color: #fff;
        box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.1);
        padding: 30px;

        .sub-title {
          color: #000;
          font-size: 20px;
          font-weight: 500;
          margin: 30px 0 10px;
        }

        .sub-desc {
          color: #666;
          font-size: 14px;
          line-height: 24px;
          margin-bottom: 30px;
          white-space: pre-line;
        }
      }

      .section-row {
        display: flex;
        flex-flow: row wrap;
        margin: -30px -45px;

        .content-wrapper {
          box-sizing: border-box;
          display: block;
          width: 50%;
          padding: 30px 45px;
          box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.1);

          .item {
            padding: 0 10px;

            .sub-title {
              color: #000;
              font-size: 20px;
              font-weight: 500;
              margin-bottom: 11px;
              position: relative;
            }

            .sub-title:before {
              background: #0074ff;
              content: "";
              height: 20px;
              left: -10px;
              position: absolute;
              top: 50%;
              transform: translateY(-50%);
              width: 2px;
            }

            .sub-desc {
              color: #666;
              font-size: 16px;
              line-height: 28px;
              margin: 0;
              white-space: pre-line;
            }
          }
        }
      }
    }

    .list-wrapper {
      display: flex;
      justify-content: center;
      margin: 0 -16px;

      .list-item {
        border: 1px solid #e7e7e7;
        border-radius: 4px;
        cursor: pointer;
        display: flex;
        margin: 0 16px 16px;
        min-height: 30px;
        padding: 15px;

        .content {
          flex: 1;

          .title {
            align-items: center;
            display: flex;
            justify-content: space-between;
          }

          .title:before {
            background: #0074ff;
            content: "";
            height: 15px;
            left: -10px;
            position: relative;
            top: 10px;
            transform: translateY(-50%);
            width: 5px;
          }
        }
      }

      .list-item:hover {
        box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.1);
      }
    }
  }
}

.anchor {
  position: fixed;
  width: 6%;
  top: 25%;
  left: 5%;
  // transform: translateX(-860px);
  padding: 5px;
  border-radius: 4px;
  background-color: rgb(255, 255, 255);
  box-sizing: border-box;
  box-shadow: 0 5px 16px 0 rgba(0, 0, 0, 0.1);
}

// @media screen and (min-width: 2560px) and (min-height: 1600px) {
//     .anchor {
//     /* 在宽度2560px及以上、高度1600px及以上时，可以根据需要调整样式 */
//     left: 50%;
//   }
// }
</style>
